package cn.teacher.service;

import cn.teacher.config.web.DataGridResultInfo;
import cn.teacher.pojo.CompetitionPlan;
import cn.teacher.pojo.dto.CompetitionInfoDTO;
import cn.teacher.pojo.dto.CompetitionPlanDTO;
import cn.teacher.pojo.dto.RegisterCompetitionDTO;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 毛苏宇
 * User: me
 * Date: 2020/6/26
 * Time: 2:59
 * Description:
 */
public interface CompetitionPlanService {

    /**
     * 添加竞赛计划
     *
     * @param competitionPlan
     * @return
     */
    boolean add(CompetitionPlan competitionPlan);

    /**
     * 移除竞赛计划
     *
     * @param cpId
     * @return
     */
    boolean remove(long cpId);

    /**
     * 更新竞赛信息
     *
     * @param competitionPlan
     * @return
     */
    boolean modify(CompetitionPlan competitionPlan);


    /**
     * 查询所有竞赛信息,包括老师
     *
     * @return
     */
    DataGridResultInfo<CompetitionPlanDTO> find(long userId, int page, int rows);


    /**
     * 分页查询某学生选的所有竞赛
     *
     * @param userId
     * @param page
     * @param rows
     * @return
     */
    DataGridResultInfo<RegisterCompetitionDTO> findRegisterCompetitionDTO(long userId, int page, int rows);


    /**
     * 查询所有竞赛信息，不包含老师信息
     *
     * @return
     */
    DataGridResultInfo<CompetitionInfoDTO> findCompetitionPlans(int page, int rows);


    /**
     * 根据竞赛id查询竞赛信息
     * @param cpId
     * @return
     */
    CompetitionInfoDTO findCompetitionPlan(long cpId);

}
